import 'package:flutter/material.dart';
import 'package:flutter_base/base/controller/base_controller.dart';
import 'package:flutter_base/config/app_color.dart';
import 'package:flutter_base/generated/assets.dart';
import 'package:flutter_base/pages/test_detail/model/model_test_detail.dart';
import 'package:flutter_base/pages/test_detail/widgets/test_card_base.dart';
import 'package:flutter_base/widgets/image/auto_image.dart';
import 'package:flutter_base/widgets/image/image_view.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

class TestRecommendationBox extends StatelessWidget {
  final ModelTestDetail? testDetail;

  const TestRecommendationBox({super.key, this.testDetail});

  @override
  Widget build(BuildContext context) {
    return TestCardBase(
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Container(
            decoration: BoxDecoration(
              color: AppColor.colorFAFAF9,
              borderRadius: BorderRadius.circular(12.w),
            ),
            alignment: Alignment.center,
            child: AutoImage(
              Assets.iconTestQuote,
              width: 32.w,
            ),
          ),
          12.horizontalSpace,
          Expanded(
              child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text(
                'Personalized recommendations',
                style: TextStyle(
                  fontSize: 16.sp,
                  fontWeight: FontWeight.w600,
                  color: AppColor.color0C0A09,
                  height: 1.5,
                  letterSpacing: 0.1,
                  fontStyle: FontStyle.italic,
                ),
              ),
              12.verticalSpaceFromWidth,
              ...[
                'Personal growth advice',
                'Career development direction',
                'Interpersonal relationship guidance'
              ].map((item) {
                return RichText(
                    text: TextSpan(children: [
                  WidgetSpan(
                      child: SizedBox(
                    width: 14.w,
                    height: 14.w,
                    child: Center(
                      child: Container(
                        width: 4.w,
                        height: 4.w,
                        margin: EdgeInsets.only(right: 4.w),
                        decoration: const BoxDecoration(
                            shape: BoxShape.circle,
                            color: AppColor.color7F909F),
                      ),
                    ),
                  )),
                  TextSpan(
                      text: item,
                      style: TextStyle(
                          color: AppColor.color7F909F, fontSize: 12.sp))
                ])).marginOnly(bottom: 8.w);
              })
            ],
          )),
        ],
      ),
    );
  }
}
